在会员分析中计算沉默会员数和流失会员数沉默会员的定义：
 
 1.只在安装当天启动过App，而且安装时间是在7天前
   
   select 
count(*) clientNum 
from (
select device_id, count(*) cnt 
from dws.dws_member_start_day 
where dt <= date_add(current_date,-7)
group by device_id having cnt >= 1
)tmp;
 2.流失会员的定义：最近30天未登录的会员
   select count(0)
from (select distinct device_id 
from dws.dws_member_start_day 
where dt <date_add(current_date,30))a--30天前的用户
left join (select distinct device_id 
from dws.dws_member_start_day 
where dt >=date_add(current_date,30))b--30天内的用户
on a.device_id=b.device_id
where b.device_id is null;